package com.slipper.system.flow.controller;

import com.slipper.system.flow.bo.FlowNodeBO;
import com.slipper.system.flow.bo.FlowNodeBOs;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.slipper.system.flow.service.FlowNodeService;
import com.slipper.util.ResultUtil;

/**
 * 流程节点信息表
 */
@RestController
@RequestMapping("/system/flowNode")
public class FlowNodeController {
    @Resource
    private FlowNodeService flowNodeService;

    @PostMapping("/queryBy")
    public String queryBy(@RequestBody FlowNodeBO bo) {
        return ResultUtil.successResult(flowNodeService.queryBy(bo.getId()));
    }

    @PostMapping("/queryFirst")
    public String queryFirst(@RequestBody FlowNodeBO bo) {
        return ResultUtil.successResult(flowNodeService.queryFirst(bo.getFlowId()));
    }
    
    @PostMapping("/queryPage")
    public String queryPage(@RequestBody FlowNodeBO bo) {
        return ResultUtil.successResult(flowNodeService.queryPage(bo));
    }
    
    @PostMapping("/queryList")
    public String queryList(@RequestBody FlowNodeBO bo) {
        return ResultUtil.successResult(flowNodeService.queryList(bo));
    }

    @PostMapping("/saveDealMan")
    public String saveDealMan(@RequestBody FlowNodeBOs bos) {
        return ResultUtil.saveResult(flowNodeService.saveDealMan(bos));
    }
}
